package com.papers.juan.domain.bo;

import com.papers.common.core.domain.BaseEntity;
import com.papers.common.core.validate.AddGroup;
import com.papers.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 试卷维护记录业务对象 t_juan_paper_record
 *
 * @author papers
 * @date 2022-10-08
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class TJuanPaperRecordBo extends BaseEntity {

    /**
     * 记录id
     */
    @NotBlank(message = "记录id不能为空", groups = {EditGroup.class})
    private String recordId;

    /**
     * 试卷ID
     */
    @NotBlank(message = "试卷ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private String paperId;

    /**
     * 试卷名称
     */
    private String paperName;

    /**
     * 类型
     */
//    @NotBlank(message = "类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String recordType;

    /**
     * 内容
     */
    @NotBlank(message = "内容不能为空", groups = {AddGroup.class, EditGroup.class})
    private String recordContent;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 院系名称
     */
    private String departName;

    /**
     * 专业名称
     */
    private String majorName;

    /**
     * 课程名称
     */
    private String courseSubject;

    /**
     * 创建人
     */
    @NotBlank(message = "创建人不能为空", groups = {AddGroup.class, EditGroup.class})
    private String createdBy;

    /**
     * 创建时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "创建时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date createdTime;

    /**
     * 更新人
     */
    @NotBlank(message = "更新人不能为空", groups = {AddGroup.class, EditGroup.class})
    private String updatedBy;

    /**
     * 更新时间
     */
    @NotNull(message = "更新时间不能为空", groups = {AddGroup.class, EditGroup.class})
    private Date updatedTime;


}
